<div class="users">
    <?php if (null !=$this->paginator[1]){
        
    foreach($this->paginator[1] as $v){
            $res=(null!=($v->getUserAva()))?$v->getUserAva():'./ava.jpg';
            
        echo "<div class='userProf'>
                        <div class='avaUser'><a href='#' onclick=\"document.location='?control=user&".$v->getUserId()."'\"><img src=\"$res\">
                            <div class='Sname'>".$v->getUserName()."</a></div>
                            <div class='Sage'>".$v->getUserAge()." age</div>
                        </div>
                    </div>";
                    
        }
        }else{
            echo "<div>There is No matches</div><div><a href='/'>Main page</a></div>";
        }
    ?>
</div>
<div class="paginator">Pagination: 
    <?php
    $v = 1;
        for($i=0; $i < $this->paginator[0]; $i++){
            echo "<span class='paginatorList'><a href='#' onclick=
            \"document.location='?control=search&".$v."'\">".$v."</a></span>\n";
        $v++;
    }
    if(isset($_SESSION['authUserId'])){
        echo"<div><a href='#' onclick=\"document.location='/?control=user&".$_SESSION['authUserId']."'\">My profile</a></div>";
    }else{
        echo"<div><a href='#' onclick=\"document.location='/'\">Main Page</a></div>";
    } 
    ?> 
</div>
